﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Presentacion
{
    public partial class SiteMaster : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string user = HttpContext.Current.User.Identity.Name;
            if (user!="")
            {
                lblUsuario.Text = "Usuario conectado: " + user;
                HeadLoginStatus.Visible = false;
            }
        }

        protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
        {
            Context.Response.Cookies["bebidas-bycq-dnr"].Expires = DateTime.Now;
            FormsAuthentication.SignOut();
            Response.Redirect("~/Default.aspx");
        }
    }
}
